<template>
  <div class="container">
    <h1>事件处理方法传递参数</h1>
    <!-- 不传参数可以不用加小括号 -->
    <button @click="one">按钮1</button><br><br>
    <!-- 传递参数加小括号  实惨 $event 固定语法-->
    <button @click="two(26, 26, $event)">按钮2</button>
    
  </div>
</template>

<script>
export default {
  methods: {
    one(c) {
      console.log(c.target)
    },
    two(a,b,c) {
      console.log(a + b)
      console.log(c.target)
    },
  },
};
</script>

<style>
p{
  width: 50px;
  height: 50px;
  color: #a6a1d9;
  font-size: 30px;
  text-align: center;
  line-height: 50px;
  border: 5px solid pink;
  border-radius: 50%;
}
h1 {
  color: #fe7299;
}
img {
  width: 150px;
  height: 150px;
}
input {
  color: #a6a1d9;
}
</style>

